package day05.pm;

public class Demo03 {
    public static void main(String[] args) {
        //循环
        for(int i=1;i<=100;i++){
            System.out.println("I Love Java ！："+i);
        }
        //求1+2+3+...+99+100
        int sum = 0;
        for(int i=1;i<=100;i++){
            sum += i;
        }
        System.out.println("sum="+sum);
        //1+3+5+7
        sum = 0;
        for(int i=1;i<=100;i+=2){
            sum+=i;
        }
        System.out.println("100以内奇数和为:"+sum);
    }
}
